//
//  WithdrawHintCell.swift
//  d11
//
//  Created by peale on 2018/11/14.
//  Copyright © 2018年 Tech_001. All rights reserved.
//

import UIKit

class WithdrawHintCell: UITableViewCell {
    var caveatImgView :UIImageView?
    var titleLabel : UILabel?
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.setUpUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    func setUpUI() -> Void {
        self.backgroundColor  = UIColor.white
        self.selectionStyle = UITableViewCell.SelectionStyle.none
        
        self.caveatImgView = UIImageView.init()
        self.caveatImgView?.image = imageNamed("icon_depoist_caveat_hint")
        self.contentView.addSubview(self.caveatImgView!)
        self.caveatImgView?.snp.makeConstraints{(make) in
            make.left.equalToSuperview().offset(12)
            make.width.equalTo(12)
            make.height.equalTo(12)
            make.top.equalToSuperview().offset(18)
        }
        
        self.titleLabel = UILabel.init()
        self.titleLabel?.text = "请您在相关注单结算完成后稍微耐心等待10-15分钟，系统之后会自动校正有效流水。详细有效流水规则请查看各游戏平台(天天返水)详情，感谢您的支持与信任！\n\n        未参加任何优惠活动存款需投注1倍有效流水（全额投注额）即可提款，如果参加活动请参照活动红利流水详细规则。【如提款未成功，请留意站内消息说明】感谢您的支持与信任！"
        self.titleLabel?.textColor = HexRGBAlpha(0xe95a74, 1)
        self.titleLabel?.numberOfLines = 0
        self.titleLabel?.textAlignment = .left
        self.titleLabel?.font = UIFont.systemFont(ofSize: 13)
        self.contentView.addSubview(self.titleLabel!)
        self.titleLabel?.snp.makeConstraints{(make) in
            make.width.equalToSuperview().offset(-40)
            make.left.equalTo((caveatImgView?.snp.right)!).offset(6)
            make.top.equalToSuperview().offset(15)
        }
    }

    
    func setData(isRed:Bool) -> Void {
        if isRed == true{
            self.titleLabel?.textColor = UIColor.red
        }else{
            self.titleLabel?.textColor = HexRGBAlpha(0xe95a74, 1)
        }
        
    }
}
